<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<div>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>

    </ul>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>

    </ul>
</div>
    <script>
        let ul = document.getElementsByTagName('ul')[0]
        let uld =document.getElementsByTagName('ul')
        let ulq =document.querySelectorAll('ul') 
        // cloneNode(深/浅克隆)    ture:深克隆   包含当前元素的子节点
        let li1s = ul.children[0].cloneNode(true)
        console.log(li1s);
        // 元素插入
        ul.appendChild(li1s)
        // .getElementsByTagName:动态获取
        // querySelectorAll:静态获取
        console.log(uld);
        console.log(ulq);
        
        // console.log(uld[0].children);
        // console.log(ulq[0].children);
        
        
        
    </script>
</body>
</html>